package com.ajk.server.model.query;

import java.util.List;

import com.ajk.server.model.SymptomDisease;

/**
 * 疾病库表  <br>
 * t_disease <br>
 * v1.0 2016-05-01
 */
public class DiseaseQuery extends Paging {

	private static final long serialVersionUID = 1L;

	private Integer id;

	private String keyword;

	private Integer bodypartId;
	
	private Integer inUsed=1;
	
	private Integer userId;
	
	private String stationId;
	/**
	 * 症状ID
	 */
	private Integer symptomId;
	
	private List<SymptomDisease> symptomDiseases;


	public Integer getBodypartId() {
		return bodypartId;
	}

	public void setBodypartId(Integer bodypartId) {
		this.bodypartId = bodypartId;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public Integer getInUsed() {
		return inUsed;
	}

	public void setInUsed(Integer inUsed) {
		this.inUsed = inUsed;
	}

	@Override
	public void dealWith() {
		super.dealWith();

		if(this.keyword!=null && this.keyword.trim().length()>0){
			if(!keyword.startsWith("%")){
				this.keyword = "%"+this.keyword;
			}
			if(!keyword.endsWith("%")){
				this.keyword = this.keyword+"%";
			}
		}else{
			this.keyword = null;
		}

	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getStationId() {
		return stationId;
	}

	public void setStationId(String stationId) {
		this.stationId = stationId;
	}

	public Integer getSymptomId() {
		return symptomId;
	}

	public void setSymptomId(Integer symptomId) {
		this.symptomId = symptomId;
	}

	public List<SymptomDisease> getSymptomDiseases() {
		return symptomDiseases;
	}

	public void setSymptomDiseases(List<SymptomDisease> symptomDiseases) {
		this.symptomDiseases = symptomDiseases;
	}

	
	

}	